#!
use strict;
use HTML::TreeBuilder;

my $filename = $ARGV[0];
my $tree = HTML::TreeBuilder->new();
$tree->parse_file($filename);
#
# Then do something with the tree, using HTML::Element
# methods -- for example $tree->dump
#
# Then:

my ($title) = $tree->look_down( '_tag' , 'title' );
#open (SAVE,">$ARGV[1]");
#print SAVE $title->as_text , "\n";
print  $tree->as_text;
#close SAVE;
$tree->delete;
